.class public Lcom/baidu/mobads/production/rewardvideo/a;
.super Lcom/baidu/mobads/production/b;
.source "SourceFile"


# instance fields
.field private A:Z

.field private B:Z

.field private y:Lcom/baidu/mobads/production/rewardvideo/b;

.field private z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Z)V
    .locals 4

    .line 1
    invoke-direct {p0, p1}, Lcom/baidu/mobads/production/b;-><init>(Landroid/content/Context;)V

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->A:Z

    .line 3
    invoke-virtual {p0, p2}, Lcom/baidu/mobads/production/b;->setId(Ljava/lang/String;)V

    .line 4
    invoke-virtual {p0, p1}, Lcom/baidu/mobads/production/b;->setActivity(Landroid/content/Context;)V

    const/4 v1, 0x0

    .line 5
    invoke-virtual {p0, v1}, Lcom/baidu/mobads/production/b;->setAdSlotBase(Landroid/widget/RelativeLayout;)V

    .line 6
    iput-boolean p3, p0, Lcom/baidu/mobads/production/rewardvideo/a;->B:Z

    .line 7
    sget-object p3, Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;->SLOT_TYPE_REWARD_VIDEO:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;

    iput-object p3, p0, Lcom/baidu/mobads/production/b;->o:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;

    .line 8
    new-instance p3, Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {p0}, Lcom/baidu/mobads/production/b;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {p0}, Lcom/baidu/mobads/production/b;->getActivity()Landroid/app/Activity;

    move-result-object v2

    iget-object v3, p0, Lcom/baidu/mobads/production/b;->o:Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;

    invoke-direct {p3, v1, v2, v3}, Lcom/baidu/mobads/production/rewardvideo/b;-><init>(Landroid/content/Context;Landroid/app/Activity;Lcom/baidu/mobads/interfaces/IXAdConstants4PDK$SlotType;)V

    iput-object p3, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    .line 9
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p3

    invoke-virtual {p3}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdConstants()Lcom/baidu/mobads/utils/l;

    move-result-object p3

    .line 10
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 11
    invoke-virtual {p3}, Lcom/baidu/mobads/utils/l;->getSupportedActionType4RequestingNone()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 12
    invoke-virtual {p3}, Lcom/baidu/mobads/utils/l;->getSupportedActionType4RequestingLandingPage()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 13
    invoke-virtual {p3}, Lcom/baidu/mobads/utils/l;->a()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 14
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v2

    invoke-virtual {v2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getPackageUtils()Lcom/baidu/mobads/utils/r;

    invoke-static {p1}, Lcom/baidu/mobads/utils/r;->b(Landroid/content/Context;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 15
    invoke-virtual {p3}, Lcom/baidu/mobads/utils/l;->getSupportedActionType4RequestingDownload()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 16
    :cond_0
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v2

    invoke-virtual {v2}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getCommonUtils()Lcom/baidu/mobads/utils/h;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/baidu/mobads/utils/h;->a(Ljava/util/List;)Ljava/lang/String;

    move-result-object v1

    .line 17
    iget-object v2, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {v2, v1}, Lcom/baidu/mobads/vo/d;->b(Ljava/lang/String;)V

    .line 18
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getCommonUtils()Lcom/baidu/mobads/utils/h;

    move-result-object v1

    invoke-virtual {v1, p1}, Lcom/baidu/mobads/utils/h;->getScreenRect(Landroid/content/Context;)Landroid/graphics/Rect;

    move-result-object p1

    .line 19
    iget-object v1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {p1}, Landroid/graphics/Rect;->width()I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/baidu/mobads/vo/d;->d(I)V

    .line 20
    iget-object v1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {p1}, Landroid/graphics/Rect;->height()I

    move-result p1

    invoke-virtual {v1, p1}, Lcom/baidu/mobads/vo/d;->e(I)V

    .line 21
    iget-object p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {p1, v0}, Lcom/baidu/mobads/vo/d;->h(I)V

    .line 22
    iget-object p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {p1, p2}, Lcom/baidu/mobads/vo/d;->d(Ljava/lang/String;)V

    .line 23
    iget-object p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    const/4 p2, 0x1

    invoke-virtual {p1, p2}, Lcom/baidu/mobads/vo/d;->g(I)V

    .line 24
    iget-object p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    sget-object p2, Lcom/baidu/mobads/AdSize;->RewardVideo:Lcom/baidu/mobads/AdSize;

    invoke-virtual {p2}, Lcom/baidu/mobads/AdSize;->getValue()I

    move-result p2

    invoke-virtual {p1, p2}, Lcom/baidu/mobads/vo/d;->f(I)V

    .line 25
    iget-object p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-virtual {p3}, Lcom/baidu/mobads/utils/l;->getAdCreativeTypeImage()I

    move-result p2

    invoke-virtual {p3}, Lcom/baidu/mobads/utils/l;->getAdCreativeTypeVideo()I

    move-result p3

    add-int/2addr p2, p3

    invoke-virtual {p1, p2}, Lcom/baidu/mobads/vo/d;->i(I)V

    return-void
.end method

.method private x()V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->h:Lcom/baidu/mobads/interfaces/IXAdContainer;

    move-object v1, v0

    check-cast v1, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    sput-object v1, Lcom/baidu/mobads/MobRewardVideoImpl;->mAdContainer:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainer;->getAdContainerContext()Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    move-result-object v0

    sput-object v0, Lcom/baidu/mobads/MobRewardVideoImpl;->mContext:Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    .line 3
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/baidu/mobads/production/b;->f:Landroid/content/Context;

    invoke-static {}, Lcom/baidu/mobads/MobRewardVideoImpl;->getActivityClass()Ljava/lang/Class;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 4
    iget-object v1, p0, Lcom/baidu/mobads/production/b;->f:Landroid/content/Context;

    if-eqz v1, :cond_0

    instance-of v1, v1, Landroid/app/Activity;

    if-nez v1, :cond_0

    const/high16 v1, 0x10000000

    .line 5
    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 6
    :cond_0
    invoke-direct {p0}, Lcom/baidu/mobads/production/rewardvideo/a;->y()Ljava/lang/String;

    move-result-object v1

    const-string v2, "orientation"

    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 7
    iget-boolean v1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->B:Z

    const-string v2, "useSurfaceView"

    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 8
    iget-object v1, p0, Lcom/baidu/mobads/production/b;->f:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method private y()Ljava/lang/String;
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->f:Landroid/content/Context;

    const-string v1, "portrait"

    if-eqz v0, :cond_1

    .line 2
    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 3
    iget v0, v0, Landroid/content/res/Configuration;->orientation:I

    const/4 v2, 0x2

    if-ne v0, v2, :cond_0

    const-string v1, "landscape"

    goto :goto_0

    :cond_0
    const/4 v2, 0x1

    :cond_1
    :goto_0
    return-object v1
.end method


# virtual methods
.method protected a(Lcom/baidu/mobads/interfaces/IXAdContainer;Ljava/util/HashMap;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/baidu/mobads/interfaces/IXAdContainer;",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    .line 4
    iget-boolean p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->A:Z

    if-eqz p1, :cond_0

    const/4 p1, 0x0

    .line 5
    iput-boolean p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->A:Z

    .line 6
    invoke-direct {p0}, Lcom/baidu/mobads/production/rewardvideo/a;->x()V

    :cond_0
    return-void
.end method

.method protected a(Lcom/baidu/mobads/openad/d/b;Lcom/baidu/mobads/production/u;I)V
    .locals 2

    int-to-double v0, p3

    .line 3
    invoke-virtual {p2, p1, v0, v1}, Lcom/baidu/mobads/openad/d/a;->a(Lcom/baidu/mobads/openad/d/b;D)V

    return-void
.end method

.method public a()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->h:Lcom/baidu/mobads/interfaces/IXAdContainer;

    check-cast v0, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    iput-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;->isExpired()Z

    move-result v0

    return v0

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method protected b(Lcom/baidu/mobads/interfaces/IXAdContainer;Ljava/util/HashMap;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/baidu/mobads/interfaces/IXAdContainer;",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    return-void
.end method

.method public b(Lcom/baidu/mobads/interfaces/IXAdResponseInfo;)V
    .locals 0

    return-void
.end method

.method public b()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->h:Lcom/baidu/mobads/interfaces/IXAdContainer;

    check-cast v0, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    iput-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;->isVideoDownloaded()Z

    move-result v0

    return v0

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method public c()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->h:Lcom/baidu/mobads/interfaces/IXAdContainer;

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainer;->load()V

    return-void
.end method

.method public c(Z)V
    .locals 0

    .line 2
    iput-boolean p1, p0, Lcom/baidu/mobads/production/rewardvideo/a;->A:Z

    return-void
.end method

.method protected d()V
    .locals 1

    const/16 v0, 0x1f40

    .line 1
    iput v0, p0, Lcom/baidu/mobads/production/b;->m:I

    return-void
.end method

.method public synthetic getAdRequestInfo()Lcom/baidu/mobads/interfaces/IXAdRequestInfo;
    .locals 1

    .line 1
    invoke-virtual {p0}, Lcom/baidu/mobads/production/rewardvideo/a;->w()Lcom/baidu/mobads/vo/d;

    move-result-object v0

    return-object v0
.end method

.method public q()V
    .locals 1

    .line 1
    invoke-super {p0}, Lcom/baidu/mobads/production/b;->q()V

    const/4 v0, 0x0

    .line 2
    sput-object v0, Lcom/baidu/mobads/MobRewardVideoImpl;->mAdContainer:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    .line 3
    sput-object v0, Lcom/baidu/mobads/MobRewardVideoImpl;->mContext:Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    return-void
.end method

.method public request()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    invoke-super {p0, v0}, Lcom/baidu/mobads/production/b;->a(Lcom/baidu/mobads/vo/d;)Z

    return-void
.end method

.method public t()Z
    .locals 4

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->h:Lcom/baidu/mobads/interfaces/IXAdContainer;

    check-cast v0, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    iput-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainer;->getAdContainerContext()Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainerContext;->getAdInstanceInfo()Lcom/baidu/mobads/interfaces/IXAdInstanceInfo;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdInstanceInfo;->getAdHasDisplayed()Z

    move-result v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    xor-int/lit8 v0, v0, 0x1

    return v0

    :catch_0
    move-exception v0

    .line 3
    iget-object v1, p0, Lcom/baidu/mobads/production/b;->u:Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "notPlayedBefore-exception="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v2, "XAbstractAdProdTemplate"

    invoke-interface {v1, v2, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method public u()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->h:Lcom/baidu/mobads/interfaces/IXAdContainer;

    check-cast v0, Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    iput-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    if-eqz v0, :cond_0

    .line 2
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainer;->getAdContainerContext()Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    .line 3
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainer;->getAdContainerContext()Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainerContext;->getAdInstanceInfo()Lcom/baidu/mobads/interfaces/IXAdInstanceInfo;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->z:Lcom/baidu/mobads/interfaces/IXRewardVideoAdContainer;

    .line 4
    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainer;->getAdContainerContext()Lcom/baidu/mobads/interfaces/IXAdContainerContext;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdContainerContext;->getAdInstanceInfo()Lcom/baidu/mobads/interfaces/IXAdInstanceInfo;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdInstanceInfo;->getVideoUrl()Ljava/lang/String;

    move-result-object v0

    .line 5
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    return v0

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method public v()V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/baidu/mobads/production/rewardvideo/a;->x()V

    return-void
.end method

.method public w()Lcom/baidu/mobads/vo/d;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/production/rewardvideo/a;->y:Lcom/baidu/mobads/production/rewardvideo/b;

    return-object v0
.end method
